﻿

namespace RealTimeCharts.LineChart
{
    /// <summary>
    /// 数据X\Y取值范围
    /// </summary>
    public class DataWnd
    {
        /// <summary>
        /// X轴坐标范围
        /// </summary>
        public ValueRange valueRangeX = new ValueRange();
        /// <summary>
        /// Y轴坐标范围
        /// </summary>
        public ValueRange valueRangeY = new ValueRange();

        public DataWnd() { }

        public DataWnd(double minX, double maxX, double minY, double maxY)
        {
            this.valueRangeX.minValue = minX;
            this.valueRangeX.maxValue = maxX;

            this.valueRangeY.minValue = minY;
            this.valueRangeY.maxValue = maxY;
        }

        public DataWnd(DataWnd wnd)
        {
            this.valueRangeX.minValue = wnd.valueRangeX.minValue;
            this.valueRangeX.maxValue= wnd.valueRangeX.maxValue;

            this.valueRangeY.minValue= wnd.valueRangeY.minValue;
            this.valueRangeY.maxValue= wnd.valueRangeY.maxValue;
        }

        public DataWnd Clone()
        {
            return new DataWnd(this);
        }
    }
}
